import request from '../../utils/request'

export function publish(params) {
  return request.ajax({
      url: `/mall/bbs/publish`,
      method: 'post',
      params
  })
}
export function getList(params) {
  return request.ajax({
      url: `/mall/bbs/getList`,
      method: 'post',
      loadding:true,
      params
  })
}
export function getDetail(id) {
  return request.ajax({
      url: `/mall/bbs/getDetail/${id}`,
      method: 'post',
      loadding:true
  })
}
export function del(id) {
  return request.ajax({
      url: `/mall/bbs/del/${id}`,
      method: 'post',
      loadding:true
  })
}
export function getSearch(params) {
  return request.ajax({
      url: `/mall/bbs/getSearch`,
      method: 'post',
      loadding:true,
      params
  })
}

//我的关注 我的粉丝/client/member/getMyOperate
export function getFansOrFollow(data) {
  return request.ajax({
    url: `/member/getMyOperate?type=${data.type}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'post',
    loadding:true
  })
}

//个人主页/client/member/getMemberInfo
export function getMemberInfo(id) {
  return request.ajax({
    url: `/member/getMemberInfo?memberId=${id}`,
    method: 'post',
    loadding:true
  })
}